import { Controller, Get, Post, Param, UseInterceptors, UploadedFile } from '@nestjs/common';
import { UploadService } from './upload.service';
import { UploadedFiles  } from 'src/upload/decorator/uploads.decorator'
@Controller('upload')
export class UploadController {
  constructor(private readonly uploadService: UploadService) {}

  @Post()
  @UploadedFiles('file',['image','markdown'])
  create(@UploadedFile() file: Express.Multer.File) {
    return file
  }

  @Get()
  findAll() {
    return this.uploadService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.uploadService.findOne(+id);
  }




}
